@ECHO OFF
REM Compiler batch file
REM (r) 1999 CBi
REM
REM USE: C file
REM
REM Do not add extension
REM

REM Checks if file is sent
IF %1==. GOTO ERROR

REM Creates a temporary subdir
REM to perform de compilation
MD TEMP
CD TEMP

REM Makes copies of system files
COPY ..\..\BIN\. > NUL
COPY ..\..\MAC\. > NUL
COPY ..\..\LIB\. > NUL
COPY ..\%1.*

REM The hardwork is made here...
M370 %1
A370 %1 /LTX
L370 %1

REM Takes the result files to the COM dir
COPY %1.COM ..\COM\*.* > NUL

REM Removes the temporary directory
CD ..
REM GTVO
REM DELTREE /y TEMP
RD TEMP /S /Q
CD COM

GOTO STOP

:ERROR
ECHO Debe indicar el nombre de un archivo.
:STOP
cd ..
ECHO.
